package com.sop.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sop.dao.RoleDao;
import com.sop.model.RoleInfo;
import com.sop.model.vo.RoleInfoVo;
import com.sop.service.RoleService;

import common.base.service.BaseServiceImpl;

@Service("roleService")
@Transactional
public class RoleServiceImpl extends BaseServiceImpl<RoleInfo,RoleInfoVo>  implements  RoleService{

	@Autowired
	private  RoleDao  roleDao;
	
	@Resource(name="roleDao")
	public void setBaseDao(RoleDao  roleDao){
		super.setBaseDao(roleDao);
	}
	
	@Override
	public Boolean deleteBatch(List<Integer> ids) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public RoleInfo add(RoleInfo entity) {
		roleDao.save(entity);
		return get(entity.getId());
	}

	@Override
	public RoleInfo update(RoleInfo entity) {
		roleDao.update(entity);
		return get(entity.getId());
	}

}
